package com.ship.controller;

import com.ship.commens.Result;
import com.ship.service.AccountService;
import com.ship.service.EmailCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("/email")
public class EmailCodeController {

    @Autowired
    private EmailCodeService emailCodeService;

    @RequestMapping("/send.do")
    public Result sendCode(String username, String email){
        Result result =  emailCodeService.sendCode(username, email);
        return result;
    }
}
